﻿@model Super.Entities.DGProduct
@{
    ViewBag.Title = "产品编辑";
}
@using (Html.AjaxBeginForm("edit", "dinggou"))
{
    <div class="pageFormContent" layouth="56">
        @Html.HiddenFor(a => a.ID)
        <p><label>产品分类:</label>
            @Html.DropDownListFor(a => a.Category_ID, (IEnumerable<SelectListItem>)ViewBag.Category, "请选择产品分类")
            <a class="button" href="/admin/productcategory/edit" mask="true" target="dialog" rel="productCategory_Edit"><span>添加分类</span> </a></p>
        <div class="divider">
        </div>
        <p style="width: 700px;"><label>产品名称</label>
            @Html.TextBoxFor(a => a.Title, new { @class = "Required", style = "width:450px;" })
        </p>
        <div class="divider">
        </div>
        @Html.DWZTextBoxFor(a => a.ID, "产品编号").Required()
        @Html.DWZTextBoxFor(a => a.CBPrice, "成本价").Required().Number()
        @Html.DWZTextBoxFor(a => a.LSPrice, "零售价").Required().Number()
        @Html.DWZTextBoxFor(a => a.VirtualCount, "虚拟销售数量").Required().Digits()
        @Html.DWZTextBoxFor(a => a.Count, "售数量").Required().Digits()
        @Html.DWZTextBoxFor(a => a.ProductLink, "产品链接").Required().Url()
        @Html.DWZDropDownListFor(a => a.State, typeof(DgProductStateEnum), "状态")
        <div class="divider">
        </div>
        <div>
            <textarea class="editor" name="description" rows="35" cols="150">@Model.Description</textarea>
        </div>
        @*<span>@Html.Raw(Model.Description)</span>*@
        @Html.TextBoxFor(a => a.CreateTime, new { type = "hidden" })
        @Html.TextBoxFor(a => a.Img, new { type = "hidden" })
    </div>
    @Html.DWZFormBar()
}
